package org.example.flink.operation;

import org.apache.flink.configuration.ConfigConstants;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.configuration.WebOptions;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

public class Hello01ExecutionEnvironment {
    public static void main(String[] args) throws Exception {
        //执行代码时创建一个本地环境
        //默认访问的端口为：8081
        StreamExecutionEnvironment environment = StreamExecutionEnvironment
                .createLocalEnvironmentWithWebUI(new Configuration());

        environment.socketTextStream("localhost", 19523).map(word -> word.toUpperCase()).print();

        environment.execute();
    }
}
